# Tanım: Tarayıcılar ve hepsi bir arada olanlar için EPSON Image Scan v3 arayüzü
# URL: http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX
# Paketçi: Cihan_Alkan 
# Gerekler: sane boost libtiff gtkmm graphicsmagick

isim=imagescan
_isim=utsushi
surum=3.42.2
_surum=0.42.2
devir=1
_fedrel=28

kaynak=(http://support.epson.net/linux/src/scanner/imagescanv3/fedora/${isim}-${surum}-1epson4fedora${_fedrel}.src.rpm
        utsushi-scan-gtkmm.desktop
        utsushi.conf)

derle() {
  bsdtar -xf ${_isim}-${_surum}.tar.gz
  cd ${_isim}-${_surum}
  sed -i -e 's/FATAL/DEBUG/' -e 's/NOTHING/ALL/' lib/log.cpp
  sed -i 's/ACTION!="add"/ACTION!="add|bind"/g' drivers/esci/utsushi-esci.rules

  cd $SRC/${_isim}-${_surum}
  ./configure CFLAGS="${CFLAGS} -Wno-error" CXXFLAGS="${CXXFLAGS} -Wno-error" \
  --with-boost-libdir=/usr/lib/ \
  --prefix=/usr/ \
  --libexecdir=/usr/lib/ \
  --sysconfdir=/etc/ \
  --enable-sane-config \
  --enable-udev-config \
  --with-gtkmm \
  --with-jpeg \
  --with-magick \
  --with-magick-pp \
  --with-sane \
  --with-tiff
  make
  make DESTDIR=${PKG} install
  install -Dm644 ${SRC}/utsushi-scan-gtkmm.desktop $PKG/usr/share/applications/utsushi-scan-gtkmm.desktop
  install -Dm644 ${SRC}/utsushi.conf $PKG/etc/utsushi/utsushi.conf
}

